package com.ysd.lis.service.eq.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ysd.common.Result;
import com.ysd.lis.entity.eq.EqPatrolTaskEqStIt;
import com.ysd.lis.entity.eq.EqSpotcheckTaskEqStIt;
import com.ysd.lis.mapper.eq.EqSpotcheckTaskEqStItMapper;
import com.ysd.lis.service.eq.EqSpotcheckTaskEqStItService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 点检记录设备的巡检标准细项 服务实现类
 * </p>
 *
 * @author WH
 * @since 2024-08-26
 */
@Service
public class EqSpotcheckTaskEqStItServiceImpl extends ServiceImpl<EqSpotcheckTaskEqStItMapper, EqSpotcheckTaskEqStIt> implements EqSpotcheckTaskEqStItService {

    @Autowired
    private EqSpotcheckTaskEqStItMapper spotcheckTaskEqStItMapper;
    @Override
    public Result findSpotcheckTaskEqStItList(EqSpotcheckTaskEqStIt eqSpotcheckTaskEqStIt) {
        LambdaQueryWrapper<EqSpotcheckTaskEqStIt> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(EqSpotcheckTaskEqStIt::getTaskEqId,eqSpotcheckTaskEqStIt.getTaskEqId());
        queryWrapper.eq(EqSpotcheckTaskEqStIt::getDelFlag,0);
        List<EqSpotcheckTaskEqStIt> eqPatrolTaskEqStIts = spotcheckTaskEqStItMapper.selectList(queryWrapper);
        return Result.succ(1, "查询成功！", eqPatrolTaskEqStIts);
    }
}
